package storeEntity

// EbStoreOrderInvoice 订单发票表
type StoreOrderInvoice struct {
	ID                  int64  `json:"id" gorm:"column:id" form:"id"`                                                          // 自增ID
	Uid                 int64  `json:"uid" gorm:"column:uid" form:"uid"`                                                       // 用户uid
	Category            string `json:"category" gorm:"column:category" form:"category"`                                        // 开票分类 order:订单
	OrderId             int64  `json:"order_id" gorm:"column:order_id" form:"order_id"`                                        // 订单id
	InvoiceId           int64  `json:"invoice_id" gorm:"column:invoice_id" form:"invoice_id"`                                  // 发票id
	HeaderType          int8   `json:"header_type" gorm:"column:header_type" form:"header_type"`                               // 抬头类型
	Type                int8   `json:"type" gorm:"column:type" form:"type"`                                                    // 发票类型
	Name                string `json:"name" gorm:"column:name" form:"name"`                                                    // 名称（发票抬头）
	DutyNumber          string `json:"duty_number" gorm:"column:duty_number" form:"duty_number"`                               // 税号
	DrawerPhone         string `json:"drawer_phone" gorm:"column:drawer_phone" form:"drawer_phone"`                            // 开票人手机号
	Email               string `json:"email" gorm:"column:email" form:"email"`                                                 // 开票人邮箱
	Tell                string `json:"tell" gorm:"column:tell" form:"tell"`                                                    // 注册电话
	Address             string `json:"address" gorm:"column:address" form:"address"`                                           // 注册地址
	Bank                string `json:"bank" gorm:"column:bank" form:"bank"`                                                    // 开户行
	CardNumber          string `json:"card_number" gorm:"column:card_number" form:"card_number"`                               // 银行卡号
	IsPay               int8   `json:"is_pay" gorm:"column:is_pay" form:"is_pay"`                                              // 是否支付
	IsRefund            int8   `json:"is_refund" gorm:"column:is_refund" form:"is_refund"`                                     // 订单是否退款
	IsInvoice           int8   `json:"is_invoice" gorm:"column:is_invoice" form:"is_invoice"`                                  // 是否开票
	InvoiceNumber       string `json:"invoice_number" gorm:"column:invoice_number" form:"invoice_number"`                      // 开票票号
	Remark              string `json:"remark" gorm:"column:remark" form:"remark"`                                              // 备注
	InvoiceTime         int64  `json:"invoice_time" gorm:"column:invoice_time" form:"invoice_time"`                            // 开票时间
	AddTime             int64  `json:"add_time" gorm:"column:add_time" form:"add_time"`                                        // 添加时间
	UniqueNum           string `json:"unique_num" gorm:"column:unique_num" form:"unique_num"`                                  // 唯一值
	InvoiceNum          string `json:"invoice_num" gorm:"column:invoice_num" form:"invoice_num"`                               // 发票号码
	InvoiceType         string `json:"invoice_type" gorm:"column:invoice_type" form:"invoice_type"`                            // 发票类型
	InvoiceSerialNumber string `json:"invoice_serial_number" gorm:"column:invoice_serial_number" form:"invoice_serial_number"` // 发票流水号
	RedInvoiceNum       string `json:"red_invoice_num" gorm:"column:red_invoice_num" form:"red_invoice_num"`                   // 发票红字编码
	IsDel               int8   `json:"is_del" gorm:"column:is_del" form:"is_del"`                                              // 是否删除
}

// TableName 表名称
func (*StoreOrderInvoice) TableName() string {
	return "eb_store_order_invoice"
}
